package com.kfyty.loveqq.sa.token.sso.client;

import cn.dev33.satoken.util.SaResult;
import com.kfyty.loveqq.framework.web.core.annotation.ExceptionHandler;
import com.kfyty.loveqq.framework.web.core.annotation.RestControllerAdvice;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler
    public SaResult handlerException(Exception e) {
        log.error(e.getMessage(), e);
        return SaResult.error(e.getMessage());
    }
}
